Martin Buck delivers "track" upload for Garmin fitness devices.
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Fri, 26 Mar 2010 03:33:18 +0000 (03:33 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Fri, 26 Mar 2010 03:33:18 +0000 (03:33 +0000)
commitb75131e133a89b0e8081cabb9be93f3fd7505e02
tree5a9885439baecfe56851ea998f1b2ec1582e644c
parent0bad1f40a52feb23dda530c3b68b4dd93d3cd64a
Martin Buck delivers "track" upload for Garmin fitness devices.

Changes:
* If tracks and waypoints should be uploaded to a device supporting course
 upload, combine them to courses and course points and upload them together
* Split track/waypoint preparation and upload into separate functions in
 garmin.c since both preparation functions are needed together for
 course+course point upload
* Merged GPS_A301_Get()/GPS_A302_Get, GPS_A301_Send()/GPS_A302_Send()
* Properly handle track segment markers for fitness devices consisting of 2
 consecutive invalid track points
* Calculate lap data totals when creating a course. Also create time stamps
 (currently using a hardcoded speed of 10km/h) for track points that lack
 them. This is required so that course points can refer to track points and
 identify them uniquely.
* Fixed course garbage collection to remove unused track points properly. So
 far, we compared the track index with the course index instead of the
 course track index which inadvertently removed tracks that were
 refereneced and left others that weren't referenced.
* Remove duplicate course points (same course index and track point time
 stamp) because the protocol spec requires these two values to be unique.
* Create course points from waypoints by mapping them to the nearest track
 point.
* Use xrealloc() consistently

git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@3898 f51c46e8-681c-474f-0cfe-069cfd0219fb
gpsbabel/garmin.c
gpsbabel/jeeps/gpsapp.c
gpsbabel/jeeps/gpsapp.h
gpsbabel/jeeps/gpscom.c
gpsbabel/jeeps/gpscom.h